package com.ag.admin.action;

import java.util.Map;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.admin.service.impl.QueryUserServiceImpl;
import com.ag.common.AjaxNotify;
import com.ag.common.BaseAction;
import com.ag.common.PageUtil;
/**
 * 用户查询
 * @author 温镇澎
 *
 */
@Scope("prototype")
@Controller("queryUserAction")
public class QueryUserAction extends BaseAction {
	private static final Logger logger = Logger.getLogger(QueryUserAction.class);
	@Resource(name="queryUserServiceImpl")
	private QueryUserServiceImpl queryUserServiceImpl;
	
	private PageUtil pageUtil;
	private Map<String,String> queryOption;
	private String ajaxRst;
	public String query(){
		try {
			pageUtil = this.queryUserServiceImpl.query(queryOption);
			ajaxRst = AjaxNotify.SUCCESS;
		} catch (Exception e) {
			ajaxRst = AjaxNotify.EXCEPTION;
			e.printStackTrace();
		}
		return "queryUser";
	}
	
	public PageUtil getPageUtil() {
		return pageUtil;
	}
	public void setPageUtil(PageUtil pageUtil) {
		this.pageUtil = pageUtil;
	}
	public Map<String, String> getQueryOption() {
		return queryOption;
	}
	public void setQueryOption(Map<String, String> queryOption) {
		this.queryOption = queryOption;
	}
	public String getAjaxRst() {
		return ajaxRst;
	}
	public void setAjaxRst(String ajaxRst) {
		this.ajaxRst = ajaxRst;
	}
	
}
